package com.blog.wl2023.entity;

import jakarta.persistence.*;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @author wule
 * @date 2023-11-17  14:53
 * @desc
 */
@Entity
@NoArgsConstructor
@AllArgsConstructor
@Table(name = "role")
@Data
public class Role {

	@Id
	@Column(name = "uuid")
	private String uuid;

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "user_id", referencedColumnName = "uuid")
	private User user;

	@Column(name = "role_name")
	private String roleName;

}
